package com.leyou.domain.db1entity;

import java.util.ArrayList;
import java.util.List;

public class CouponandactivityExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public CouponandactivityExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCouponandactivitykeyIsNull() {
            addCriterion("couponandactivitykey is null");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyIsNotNull() {
            addCriterion("couponandactivitykey is not null");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyEqualTo(String value) {
            addCriterion("couponandactivitykey =", value, "couponandactivitykey");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyNotEqualTo(String value) {
            addCriterion("couponandactivitykey <>", value, "couponandactivitykey");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyGreaterThan(String value) {
            addCriterion("couponandactivitykey >", value, "couponandactivitykey");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyGreaterThanOrEqualTo(String value) {
            addCriterion("couponandactivitykey >=", value, "couponandactivitykey");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyLessThan(String value) {
            addCriterion("couponandactivitykey <", value, "couponandactivitykey");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyLessThanOrEqualTo(String value) {
            addCriterion("couponandactivitykey <=", value, "couponandactivitykey");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyLike(String value) {
            addCriterion("couponandactivitykey like", value, "couponandactivitykey");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyNotLike(String value) {
            addCriterion("couponandactivitykey not like", value, "couponandactivitykey");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyIn(List<String> values) {
            addCriterion("couponandactivitykey in", values, "couponandactivitykey");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyNotIn(List<String> values) {
            addCriterion("couponandactivitykey not in", values, "couponandactivitykey");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyBetween(String value1, String value2) {
            addCriterion("couponandactivitykey between", value1, value2, "couponandactivitykey");
            return (Criteria) this;
        }

        public Criteria andCouponandactivitykeyNotBetween(String value1, String value2) {
            addCriterion("couponandactivitykey not between", value1, value2, "couponandactivitykey");
            return (Criteria) this;
        }

        public Criteria andActivitykeyIsNull() {
            addCriterion("activitykey is null");
            return (Criteria) this;
        }

        public Criteria andActivitykeyIsNotNull() {
            addCriterion("activitykey is not null");
            return (Criteria) this;
        }

        public Criteria andActivitykeyEqualTo(String value) {
            addCriterion("activitykey =", value, "activitykey");
            return (Criteria) this;
        }

        public Criteria andActivitykeyNotEqualTo(String value) {
            addCriterion("activitykey <>", value, "activitykey");
            return (Criteria) this;
        }

        public Criteria andActivitykeyGreaterThan(String value) {
            addCriterion("activitykey >", value, "activitykey");
            return (Criteria) this;
        }

        public Criteria andActivitykeyGreaterThanOrEqualTo(String value) {
            addCriterion("activitykey >=", value, "activitykey");
            return (Criteria) this;
        }

        public Criteria andActivitykeyLessThan(String value) {
            addCriterion("activitykey <", value, "activitykey");
            return (Criteria) this;
        }

        public Criteria andActivitykeyLessThanOrEqualTo(String value) {
            addCriterion("activitykey <=", value, "activitykey");
            return (Criteria) this;
        }

        public Criteria andActivitykeyLike(String value) {
            addCriterion("activitykey like", value, "activitykey");
            return (Criteria) this;
        }

        public Criteria andActivitykeyNotLike(String value) {
            addCriterion("activitykey not like", value, "activitykey");
            return (Criteria) this;
        }

        public Criteria andActivitykeyIn(List<String> values) {
            addCriterion("activitykey in", values, "activitykey");
            return (Criteria) this;
        }

        public Criteria andActivitykeyNotIn(List<String> values) {
            addCriterion("activitykey not in", values, "activitykey");
            return (Criteria) this;
        }

        public Criteria andActivitykeyBetween(String value1, String value2) {
            addCriterion("activitykey between", value1, value2, "activitykey");
            return (Criteria) this;
        }

        public Criteria andActivitykeyNotBetween(String value1, String value2) {
            addCriterion("activitykey not between", value1, value2, "activitykey");
            return (Criteria) this;
        }

        public Criteria andCouponkeyIsNull() {
            addCriterion("couponkey is null");
            return (Criteria) this;
        }

        public Criteria andCouponkeyIsNotNull() {
            addCriterion("couponkey is not null");
            return (Criteria) this;
        }

        public Criteria andCouponkeyEqualTo(String value) {
            addCriterion("couponkey =", value, "couponkey");
            return (Criteria) this;
        }

        public Criteria andCouponkeyNotEqualTo(String value) {
            addCriterion("couponkey <>", value, "couponkey");
            return (Criteria) this;
        }

        public Criteria andCouponkeyGreaterThan(String value) {
            addCriterion("couponkey >", value, "couponkey");
            return (Criteria) this;
        }

        public Criteria andCouponkeyGreaterThanOrEqualTo(String value) {
            addCriterion("couponkey >=", value, "couponkey");
            return (Criteria) this;
        }

        public Criteria andCouponkeyLessThan(String value) {
            addCriterion("couponkey <", value, "couponkey");
            return (Criteria) this;
        }

        public Criteria andCouponkeyLessThanOrEqualTo(String value) {
            addCriterion("couponkey <=", value, "couponkey");
            return (Criteria) this;
        }

        public Criteria andCouponkeyLike(String value) {
            addCriterion("couponkey like", value, "couponkey");
            return (Criteria) this;
        }

        public Criteria andCouponkeyNotLike(String value) {
            addCriterion("couponkey not like", value, "couponkey");
            return (Criteria) this;
        }

        public Criteria andCouponkeyIn(List<String> values) {
            addCriterion("couponkey in", values, "couponkey");
            return (Criteria) this;
        }

        public Criteria andCouponkeyNotIn(List<String> values) {
            addCriterion("couponkey not in", values, "couponkey");
            return (Criteria) this;
        }

        public Criteria andCouponkeyBetween(String value1, String value2) {
            addCriterion("couponkey between", value1, value2, "couponkey");
            return (Criteria) this;
        }

        public Criteria andCouponkeyNotBetween(String value1, String value2) {
            addCriterion("couponkey not between", value1, value2, "couponkey");
            return (Criteria) this;
        }

        public Criteria andTotalIsNull() {
            addCriterion("total is null");
            return (Criteria) this;
        }

        public Criteria andTotalIsNotNull() {
            addCriterion("total is not null");
            return (Criteria) this;
        }

        public Criteria andTotalEqualTo(Integer value) {
            addCriterion("total =", value, "total");
            return (Criteria) this;
        }

        public Criteria andTotalNotEqualTo(Integer value) {
            addCriterion("total <>", value, "total");
            return (Criteria) this;
        }

        public Criteria andTotalGreaterThan(Integer value) {
            addCriterion("total >", value, "total");
            return (Criteria) this;
        }

        public Criteria andTotalGreaterThanOrEqualTo(Integer value) {
            addCriterion("total >=", value, "total");
            return (Criteria) this;
        }

        public Criteria andTotalLessThan(Integer value) {
            addCriterion("total <", value, "total");
            return (Criteria) this;
        }

        public Criteria andTotalLessThanOrEqualTo(Integer value) {
            addCriterion("total <=", value, "total");
            return (Criteria) this;
        }

        public Criteria andTotalIn(List<Integer> values) {
            addCriterion("total in", values, "total");
            return (Criteria) this;
        }

        public Criteria andTotalNotIn(List<Integer> values) {
            addCriterion("total not in", values, "total");
            return (Criteria) this;
        }

        public Criteria andTotalBetween(Integer value1, Integer value2) {
            addCriterion("total between", value1, value2, "total");
            return (Criteria) this;
        }

        public Criteria andTotalNotBetween(Integer value1, Integer value2) {
            addCriterion("total not between", value1, value2, "total");
            return (Criteria) this;
        }

        public Criteria andAmountIsNull() {
            addCriterion("amount is null");
            return (Criteria) this;
        }

        public Criteria andAmountIsNotNull() {
            addCriterion("amount is not null");
            return (Criteria) this;
        }

        public Criteria andAmountEqualTo(Integer value) {
            addCriterion("amount =", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotEqualTo(Integer value) {
            addCriterion("amount <>", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThan(Integer value) {
            addCriterion("amount >", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountGreaterThanOrEqualTo(Integer value) {
            addCriterion("amount >=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThan(Integer value) {
            addCriterion("amount <", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountLessThanOrEqualTo(Integer value) {
            addCriterion("amount <=", value, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountIn(List<Integer> values) {
            addCriterion("amount in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotIn(List<Integer> values) {
            addCriterion("amount not in", values, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountBetween(Integer value1, Integer value2) {
            addCriterion("amount between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andAmountNotBetween(Integer value1, Integer value2) {
            addCriterion("amount not between", value1, value2, "amount");
            return (Criteria) this;
        }

        public Criteria andCountIsNull() {
            addCriterion("count is null");
            return (Criteria) this;
        }

        public Criteria andCountIsNotNull() {
            addCriterion("count is not null");
            return (Criteria) this;
        }

        public Criteria andCountEqualTo(Integer value) {
            addCriterion("count =", value, "count");
            return (Criteria) this;
        }

        public Criteria andCountNotEqualTo(Integer value) {
            addCriterion("count <>", value, "count");
            return (Criteria) this;
        }

        public Criteria andCountGreaterThan(Integer value) {
            addCriterion("count >", value, "count");
            return (Criteria) this;
        }

        public Criteria andCountGreaterThanOrEqualTo(Integer value) {
            addCriterion("count >=", value, "count");
            return (Criteria) this;
        }

        public Criteria andCountLessThan(Integer value) {
            addCriterion("count <", value, "count");
            return (Criteria) this;
        }

        public Criteria andCountLessThanOrEqualTo(Integer value) {
            addCriterion("count <=", value, "count");
            return (Criteria) this;
        }

        public Criteria andCountIn(List<Integer> values) {
            addCriterion("count in", values, "count");
            return (Criteria) this;
        }

        public Criteria andCountNotIn(List<Integer> values) {
            addCriterion("count not in", values, "count");
            return (Criteria) this;
        }

        public Criteria andCountBetween(Integer value1, Integer value2) {
            addCriterion("count between", value1, value2, "count");
            return (Criteria) this;
        }

        public Criteria andCountNotBetween(Integer value1, Integer value2) {
            addCriterion("count not between", value1, value2, "count");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}